package com.qhg.saas_server.controller;


import com.github.pagehelper.PageInfo;
import com.qhg.saas_server.empty.Result;
import com.qhg.saas_server.pojo.dto.PersonalSalesDto;
import com.qhg.saas_server.service.PersonalSalesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/PersonalSales")
@Api("人员销售动态模块")
@CrossOrigin
public class PersonalSalesController {

    @Autowired
    PersonalSalesService personalSalesService;

    @ApiOperation("根据条件查询人员销售动态")
    @PostMapping
    public Result getPersonalSalesByConditon(@RequestBody  PersonalSalesDto personalSalesDto){

        PageInfo<PersonalSalesDto> pageInfo = personalSalesService.getPersonalSalesByConditon(personalSalesDto);
        return  Result.success(pageInfo);

    }

}
